/*
 * Copyright 2009 Jesse McLaughlin (nzjess@gmail.com)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *         http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.travelfusion.xmlclient.ri.xobject.misc;

import java.io.Serializable;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * A currency has a code (eg. CAD), a name (eg. Canadian Dollar) and a US doller rate (eg. 1.2788). The rate is the
 * value to </i>divide</i> an amount in this currency by, in order to find the equivalent amount in US dollars.
 * <p>
 * Note that the <code>symbol</code> and <code>tier1</code> properties on this object are not filled in by the XML API
 * natively. But there are configurable hooks to fill these values in according to your requirements.
 * 
 * @author Jesse McLaughlin (nzjess@gmail.com)
 */
public class XCurrency implements Serializable, IsSerializable {

  private static final long serialVersionUID = 1L;

  private String code;
  private String name;
  private double usdRate;

  private String symbol;
  private boolean tier1;

  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public double getUsdRate() {
    return usdRate;
  }

  public void setUsdRate(double usdRate) {
    this.usdRate = usdRate;
  }

  public String getSymbol() {
    return symbol;
  }

  public void setSymbol(String symbol) {
    this.symbol = symbol;
  }

  public boolean isTier1() {
    return tier1;
  }

  public void setTier1(boolean tier1) {
    this.tier1 = tier1;
  }
}
